<?php

namespace app\common\business;

use app\common\lib\Time;
use app\common\lib\Str;
use think\facade\Cache;
use think\Exception;

class Courseware
{
    public $coursewareObj = null;

    public function __construct()
    {
        $this->coursewareObj = new \app\common\model\Courseware();
    }

    public function courseware($data)
    {
        return $this->coursewareObj->courseware($data);
    }

    public function one_courseware($id)
    {
        return $this->coursewareObj->find($id);
    }

    public function add_courseware($data)
    {
        $this->coursewareObj->save($data);
    }

    public function edit_courseware($data)
    {
        $this->coursewareObj::update($data);
    }

    public function del_courseware($id)
    {
        $this->coursewareObj::destroy($id);;
    }
}